﻿<UserControl
	x:Class="TestGUI.MainPage"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:me="clr-namespace:TestGUI"
	xmlns:MVVMSL="clr-namespace:Riba.MVVMSL;assembly=RibaMVVMSL"
	mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="950"
>
	<UserControl.DataContext>
		<me:MainPageViewModel />
	</UserControl.DataContext>

	<Grid x:Name="LayoutRoot" Background="White">
		<Grid.RowDefinitions>
			<RowDefinition Height="30" />
			<RowDefinition />
			<RowDefinition Height="30" />
			<RowDefinition Height="20" />
			<RowDefinition Height="20" />
		</Grid.RowDefinitions>

		<MVVMSL:ViewEventHandlerControl />

		<TextBox Text="{Binding DataFromChildWindow, Mode=TwoWay}" />

		<TextBlock Text="{Binding NotificationFromPage3}" Grid.Row="2" />

		<StackPanel Orientation="Horizontal" Grid.Row="3">
			<Button Content="ShowMessageBox" Command="{Binding CommandShowMessageBox, Mode=OneWay}" />
			<Button Content="OpenFileDialog" Command="{Binding CommandOpenFileDialog, Mode=OneWay}" />
			<Button Content="LoadChildWindow" Command="{Binding CommandLoadChildWindow}" />
			<Button Content="NavigateAutoSwap" Command="{Binding CommandNavigateAutoSwap}" />
			<Button Content="CommandNavigateToView" Command="{Binding CommandNavigateToView}" />
			<Button Content="CommandNavigateToDialog1" Command="{Binding CommandNavigateToDialog1}" />
			<Button Content="CommandNavigateClear" Command="{Binding CommandNavigateClear}" />
			<Button Content="DE" Command="{Binding CommandDE}" />
			<Button Content="EN" Command="{Binding CommandEN}" />
		</StackPanel>

		<TextBlock Text="{Binding Status}" Grid.Row="4" />

		<MVVMSL:NavigatorControl
			Grid.Row="1"
			DefaultView="TestGUI.Page1, TestGUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
			DefaultAnimationMode="Forward"
			IsDirtyQuestion="Sie haben Änderungen. Wollen Sie diese speichern?"
			IsDirtyQuestionCaption="Änderungen"
			ContinueNavigationButtonCaption="Nicht speichern"
			CancelNavigationButtonCaption="Zurück zum Speichern"
			IsDirtyQuestionWindowStyle="{StaticResource ChildWindowStyle}"
		/>
	</Grid>
</UserControl>